<%@ Control Language="C#" AutoEventWireup="true" CodeFile="searchform.ascx.cs" Inherits="forums_controls_search_searchform" %>
<div style="border : 2px solid #CCCCCC; background-color : #EEEEEE;">
    <table width="100%" border="0" cellpadding="0">
        <tr>
            <td width="50%" valign="top">
                <fieldset>
                    <legend>Search by Keyword:</legend>
                        Keyword(s):<br />
                        <asp:TextBox runat="server" ID="txtKeywords" MaxLength="100" /><br />
                        <asp:DropDownList runat="server" ID="ddlKeywordType">
                            <asp:ListItem Value="0">Search Entire Post</asp:ListItem>
                            <asp:ListItem Value="1">Search Subjects Only</asp:ListItem>
                        </asp:DropDownList>
                </fieldset>
            </td>
            <td width="50%" valign="top">
                <fieldset>
                    <legend>Search by Username:</legend>
                    Username:<br />
                    <asp:TextBox runat="server" ID="txtUsername" MaxLength="25" /><br />
                    <asp:DropDownList runat="server" ID="ddlUsernameType">
                        <asp:ListItem Value="0">Find Threads Started By User</asp:ListItem>
                        <asp:ListItem Value="1">Find All Posts By User</asp:ListItem>
                    </asp:DropDownList>
                </fieldset>
            </td>
        </tr>
        <tr>
            <td width="50%" valign="top">
                <fieldset>
                    <legend>Find Threads With</legend>
                    <asp:DropDownList runat="server" ID="ddlReplyCountType">
                        <asp:ListItem Value="0">At least</asp:ListItem>
                        <asp:ListItem Value="1">At most</asp:ListItem>
                    </asp:DropDownList>
                    <asp:TextBox runat="server" ID="txtReplyCount" MaxLength="6"
                        Text="0"
                        Columns="5"
                    />
                    replies
                </fieldset>
                <div>&nbsp;</div>
                <fieldset>
                    <legend>Find posts from</legend>
                    <asp:DropDownList runat="server" ID="ddlDateType">
                        <asp:ListItem Value="0">Any date</asp:ListItem>
                        <asp:ListItem Value="1">A week ago</asp:ListItem>
                        <asp:ListItem Value="2">A month ago</asp:ListItem>
                        <asp:ListItem Value="3">3 months ago</asp:ListItem>
                        <asp:ListItem Value="4">6 months ago</asp:ListItem>
                        <asp:ListItem Value="5">A year ago</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList runat="server" ID="ddlDateFilterType">
                        <asp:ListItem Value="0">and newer</asp:ListItem>
                        <asp:ListItem Value="1">and older</asp:ListItem>
                    </asp:DropDownList>
                </fieldset>
                <div>&nbsp;</div>
                <fieldset>
                    <legend>Sort posts by</legend>
                    <asp:DropDownList runat="server" ID="ddlSortType">
                        <asp:ListItem Value="0">Last Post Date</asp:ListItem>
                        <asp:ListItem Value="1">Thread start date</asp:ListItem>
                        <asp:ListItem Value="2">Username</asp:ListItem>
                        <asp:ListItem Value="3">Forum</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList runat="server" ID="ddlSortDirection">
                        <asp:ListItem Value="0">Descending</asp:ListItem>
                        <asp:ListItem Value="1">Ascending</asp:ListItem>
                    </asp:DropDownList>
                </fieldset>
                <div>&nbsp;</div>
                <fieldset>
                    <legend>Show results as</legend>
                    <asp:RadioButton runat="server" ID="optThreads"
                        GroupName="optResultsAs"
                        Text="Threads" Checked="True"/>
                    <asp:RadioButton runat="server" ID="optPosts"
                        GroupName="optResultsAs"
                        Text="Posts"/>
                </fieldset>
            </td>
            <td width="50%" valign="top">
                <fieldset>
                    <legend>Search in Forum(s)</legend>
                    <asp:ListBox runat="server" ID="lstForums"
                         SelectionMode="multiple"
                         DataTextField="Name"
                         DataValueField="ID"
                         Rows="10"
                         Width="100%"/>
                </fieldset>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="right">
                Forum search is currently broken. <br />
                <asp:Button runat="server" ID="btnSearch"
                    Text="Search"
                    OnClientClick="javascript:this.value='Searching...';"
                    OnClick="btnSearch_Click"
                    Enabled="false" />
            </td>
        </tr>
    </table>
</div>